/*
 * Copyright (c) 2003-2005
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.hibernate.pojo;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author Anatol Pomozov
 * @hibernate.class table="`CompositeMapping`"
 */
public class CompositeMapping {
    /**
     * @hibernate.list fetch="join" access="field"
     * @hibernate.key column="userName"
     * @hibernate.list-index column="displayOrder" base="1"
     * @hibernate.composite-element class="org.xdoclet.plugin.hibernate.pojo.CompositeMapping$Email"
     */
    private List emailAddresses;
    /**
     * @hibernate.list
     * @hibernate.key column="userName"
     * @hibernate.list-index column="displayOrder" base="1"
     * @hibernate.composite-element class="org.xdoclet.plugin.hibernate.pojo.CompositeMapping$Permission" node="@test"
     */
    private List permissions;
    /**
     * @hibernate.id generator-class="native"
     */
    private Long userName;

    /**
     * @hibernate.map
     * @hibernate.key column="userName"
     * @hibernate.map-key column="attributeName" type="string"
     * @hibernate.element column="attributeValue" type="serializable" not-null="true"
     */
    private Map sessionData;

    public class Email {
        /**
         * @hibernate.property access="field"
         */
        private String address;
    }

    /**
     * @hibernate.meta attribute="meta" inherit="false"
     */
    public class Permission {
        /**
         * @hibernate.parent
         */
        private Date parent;
        /**
         * @hibernate.property column="permissionType"
         */
        private String type;
    }
}